const getters = {
  userName: state => state.app.userName,
  token: state => state.user.token,
  userInfo: state => state.user.userInfo,
  contactList: state => state.contact.contactList,
  chatList: state => state.chat.chatList,
  chatHistory: state => state.chat.chatHistory,
  allUnRead: state => state.chat.chatList.map(item => item.unread || 0).reduce((prev, next) => prev + next, 0)
}
export default getters
